using System.Collections;
using System.Collections.Generic;
using DG.Tweening;
using DG.Tweening.Core;
using TMPro;
using UnityEngine;

namespace WorkFlow.TweenGo
{
    public class TmpTextFrameTween : TweenGoBase<TextMeshProUGUI,int>
    {
        [SerializeField] private string[] frames;
        protected override Tweener CreateTween(DOGetter<int> startValueGetter, DOSetter<int> setter, int endValue, float duration)
        {
            return DOTween.To(startValueGetter, setter, endValue, duration);
        }

        protected override void SetValue(int value)
        {
            Target.text = frames[value];
        }
    }
}

